package controller;

import view.UI;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class ScoreButtonListener implements ActionListener {
    private int score;
private JLabel soreJLabel;
private JaoFenTimer jaoFenTimer;
    public ScoreButtonListener(int score,JLabel soreJLabel) {
        this.score = score;
        this.soreJLabel=soreJLabel;
    }
    @Override
    public void actionPerformed(ActionEvent e) {

        if(score==0){
            UI.enterGameJFrame.enterGameJPanel.soreJLabel.setText("不叫分");
        }else {
            UI.enterGameJFrame.enterGameJPanel.soreJLabel.setText("叫"+String.valueOf(score)+"分");
        }
    }
}
